Part Number Hot Search : 
6500V HC86N TA480XXF NVFMCZ PC354N1T 55243K PR114K LM8050
Product Description
Full Text Search
 

To Download M37220M3-010SP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 p0 6 /int2/a-d4 x out h sync v sync p0 0 /pwm0 p0 1 /pwm1 p0 2 /pwm2 p0 3 /pwm3 p0 4 /pwm4 p0 5 /pwm5 p0 7 /int1 p2 3 /tim3 p2 4 /tim2 p2 5 p2 6 p2 7 d-a p3 2 cnv ss x in v ss p5 2 /r p5 3 /g p5 4 /b p5 5 /out p2 0 /s clk p2 1 /s out p2 2 /s in p1 0 p1 1 p1 2 p1 3 p1 4 p1 5 /a-d1/int3 p1 6 /a-d2 p3 0 /a-d5/da1 p3 1 /a-d6/da2 reset osc1/p3 3 osc2/p3 4 v cc p1 7 /a-d3 m37220m3-xxxsp pin configuration (top view) description the m37220m3-xxxsp is a single-chip microcomputer designed with cmos silicon gate technology. it is housed in a 42-pin shrink plastic molded dip. in addition to their simple instruction sets, the rom, ram and i/o addresses are placed on the same memory map to enable easy pro- gramming. the m37220m3-xxxsp has a pwm output function and a osd dis- play function, so it is useful for a channel selection system for tv. features ? number of basic instructions ..................................................... 71 ? memory size rom ........................................................ 12 k bytes ram ......................................................... 256 bytes rom for display......................................... 4 k bytes ram for display .......................................... 80 bytes ? the minimum instruction execution time .......................................... 0.5 m s (at 8 mhz oscillation frequency) ? power source voltage .................................................. 5 v 10 % ? power dissipation ............................................................. 165 mw (at 8 mhz oscillation frequency, v cc =5.5v, at crt display) ? subroutine nesting ....................................... 96 levels (maximum) ? interrupts ....................................................... 13 types, 13 vectors ? 8-bit timers .................................................................................. 4 ? programmable i/o ports (ports p0, p1, p2, p3 0 Cp3 2 ) .............. 27 ? input ports (ports p3 3 , p3 4 ) ......................................................... 2 ? output ports (ports p5 2 Cp5 5 ) ...................................................... 4 ? 12 v withstand ports ....................................................................6 ? led drive ports ........................................................................... 4 ? serial i/o ............................................................ 8-bit 5 1 channel ? a-d comparator (6-bit resolution) ................................ 6 channels ? d-a converter (6-bit resolution) ................................................... 2 ? pwm output circuit ......................................... 14-bit 5 1, 8-bit 5 6 ? crt display function number of display characters ................ 24 characters 5 2 lines (16 lines maximum) kinds of characters ..................................................... 128 kinds dot structure .......................................................... 12 5 16 dots kinds of character sizes .................................................. 3 kinds kinds of character colors (it can be specified by the character) maximum 7 kinds (r, g, b) kinds of raster colors (maximum 7 kinds) display position horizontal .................................................................. 64 levels vertical .................................................................... 128 levels bordering (horizontal and vertical) application tv outline 42p4b mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 2 functional block diagram of m37220m3-xxxsp out clock input clock output x in x out reset input v cc v ss cnv ss clock output for display input ports p3 3, p3 4 osc1 osc2 clock input for display int2 int1 pwm5 pwm4 pwm3 pwm2 pwm1 pwm0 p5 (4) b g r h sync v sync a-d comparator 14-bit pwm circuit 8-bit pwm circuit accumulator a (8) timer 4 t4 (8) timer 3 t3 (8) timer 2 t2 (8) timer 1 t1 (8) timer count source selection circuit tim2 tim3 instruction register (8) instruction decoder control signal crt circuit stack pointer s (8) index register y (8) index register x (8) processor status register ps (8) 8-bit arithmetic and logical unit rom 12 k bytes program counter pc l (8) program counter pc h (8) ram 256 bytes data bus clock generating circuit reset output ports p5 2 Cp5 5 address bus si/o(8) s in s clk s out int3 10 9 8 7 6 5 4 3 i/o port p0 28 29 30 31 32 3334 35 p1 (8) i/o port p1 15 14 13 12 11 3637 38 p2 (8) i/o port p2 i/o ports p3 0 Cp3 2 17 2627 16 p3 (3) p0 (8) 39 40 41 42 2 1 20 19 25 22 21 18 24 23 ( f ) timing output d-a d-a converter
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 3 number of basic instructions instruction execution time clock frequency memory size input/output ports serial i/o a-d comparatpr d-a converter pwm output circuit timers subroutine nesting interrupt clock generating circuit power source voltage power dissipation operating temperature range device structure package crt display function 71 0.5 m s (the minimum instruction execution time, at 8 mhz oscillation fre- quency) 8 mhz (maximum) 12k bytes 256 bytes 4k bytes 80 bytes 8-bit 5 1 (n-channel open-drain output structure, can be used as pwm output pins, int input pins, a-d input pin) 8-bit 5 1 (cmos input/output structure, can be used as a-d input pins, int input pin) 2-bit 5 1 (cmos input/output or n-channel open-drain output structure, can be used as serial output pins) 6-bit 5 1 (cmos input/output structure, can be used as serial input pin, external clock input pins) 2-bit 5 1 (cmos input/output or n-channel open-drain output structure, can be used as a-d input pins, d-a conversion output pins) 1-bit 5 1 (n-channel open-drain output structure) 2-bit 5 1 (can be used as crt display clock i/o pins) 4-bit 5 1 (cmos output structure, can be used as crt output pins) 8-bit 5 1 6 channels (6-bit resolution) 2 (6-bit resolution) 14-bit 5 1, 8-bit 5 6 8-bit timer 5 4 96 levels (maximum) external interrupt 5 3, internal timer interrupt 5 4, serial i/o interrupt 5 1, crt interrupt 5 1, x in /4096 interrupt 5 1, v sync interrupt 5 1, brk interrupt 5 1 2 built-in circuits (externally connected a ceramic resonator or a quartz- crystal oscillator) 5 v 10 % 165 mw typ. (at oscillation frequency f cpu = 8 mhz, f crt = 8 mhz) 110 mw typ. (at oscillation frequency f cpu = 8 mhz) 1.65 mw (maximum) C10 c to 70 c cmos silicon gate process 42-pin shrink plastic molded dip 20 characters 5 2 lines (maximum 16 lines by software) 12 5 16 dots 128 kinds 3 kinds maximum 7 kinds (r, g, b); can be specified by the character 64 levels (horizontal) 5 128 levels (vertical) parameter functions functions rom ram crt rom crt ram p0 p1 0 Cp1 7 p2 0 , p2 1 p2 2 Cp2 7 p3 0 , p3 1 p3 2 p3 3 , p3 4 p5 2 Cp5 5 i/o i/o i/o i/o i/o i/o input output crt on crt off in stop mode number of display characters dot structure kinds of characters kinds of character sizes kinds of character colors display position (horizontal, vertical)
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 4 pin description pin input/ output name v cc, v ss cnv ss reset x in x out p0 0 /pwm0C p0 5 /pwm5, p0 6 /int2/ a-d4, p0 7 /int1 p1 0 Cp1 4 , p1 5 /a-d1 int3, p1 6 /a-d2, p1 7 /a-d3 p2 0 /s clk , p2 1 /s out , p2 2 /s in , p2 3 /tim3, p2 4 /tim2, p2 5 Cp2 7 p3 0 /a-d5/ da1, p3 1 /a-d6/ da2, p3 2 p3 3 /osc1, p3 4 /osc2 apply voltage of 5 v 10 % (typical) to v cc , and 0 v to v ss . this is connected to v ss . to enter the reset state, the reset input pin must be kept at a l for 2 m s or more (under normal v cc conditions). if more time is needed for the quartz-crystal oscillator to stabilize, this l condition should be maintained for the required time. this chip has an internal clock generating circuit. to control generating frequency, an external ceramic resonator or a quartz-crystal oscillator is connected between pins x in and x out . if an external clock is used, the clock source should be connected to the x in pin and the x out pin should be left open. port p0 is an 8-bit i/o port with direction register allowing each i/o bit to be individually programmed as input or output. at reset, this port is set to input mode. the output structure is n-channel open-drain output. the note out of this table gives a full of port p0 function. pins p0 0 Cp0 5 are also used as pwm output pins pwm0Cpwm5 respectively.the output structure is n-channel open-drain output. pins p0 6 , p0 7 are also used as external interrupt input pins int2, int1 respectively. pins p0 6 is also used as an analog interrupt input pin a-d4. port p1 is an 8-bit i/o port and has basically the same functions as port p0. the output structure is cmos output. pins p1 5 Cp1 7 are also used as an analog input pins a-d1 to a-d3. pin p1 5 is also used as an external interrupt input pins int3. port p2 is an 8-bit i/o port and has basically the same functions as port p0. the output structure is cmos output. pins p2 3 , p2 4 is also used an external clock input pins tim3, tim2 respectively. pins p2 1 , p2 2 are also used serial i/o data input/output pins s out , s in respectively. the output structure is n-channel open-drain output. pin p2 0 is also used serial i/o syncronizing clock input/output pin s clk . the output struc- ture is n-channel open-drain output. ports p3 0 Cp3 2 are a 3-bit i/o port and have basically the same functions as port p0. either cmos output or n-channel open-drain output structure can be selected as the ports p3 0 and p3 1 . the output structure of port p3 2 is n-channel open-drain output. pins p3 0 , p3 1 are also used as analog input pins a-d5, a-d6 respectively. pins p3 0 , p3 1 are also used as d-a conversion output pins da1, da2 respectively. ports p3 3 , p3 4 are a 2-bit input port. pin p3 3 is also used as crt display clock input pin osc1. pin p3 4 is also used as crt display clock output pin osc2.the output structure is cmos output. input input output i/o output input input i/o input input i/o input i/o i/o i/o input output input input output power source cnv ss reset input clock input clock output i/o port p0 pwm output external interrupt input analog input i/o port p1 analog input external interrupt input i/o port p2 external clock input serial i/o data input/output serial i/o synchro- nizing clock input/ output i/o port p3 analog input d-a conversion output input port p3 clock input for crt display clock output for crt display functions
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 5 output port p5 crt output h sync input v sync input da output pin description (continued) p5 2 /r, p5 3 /g, p5 4 /b, p5 5 /out h sync v sync d-a output output input input output ports p5 2 Cp5 5 are a 4-bit output port. the output structure is cmos output. pins p5 2 Cp5 5 are also used as crt output pins r, g, b, out respectively. the output structure is cmos output. this is a horizontal synchronizing signal input for crt display. this is a vertical synchronizing signal input for crt display. this is an output pin for 14-bit pwm. note : as shown in the memory map (figure 3), port p0 is accessed as a memory at address 00c0 16 of zero page. port p0 has the port p0 direction register (address 00c1 16 of zero page) which can be used to program each bit as an input (0) or an output (1). the pins programmed as 1 in the direction register are output pins. when pins are programmed as 0, they are input pins. when pins are programmed as output pins, the output data are written into the port latch and then output. when data is read from the output pins, the output pin level is not read but the data of the port latch is read. this allows a previously-output value to be read correctly even if the output l voltage has risen, for example, because a light emitting diode was directly driven. the input pins are in the floating state, so the values of the pins can be read. when data is written into the input pin, it is written only into the port latch, while the pin remains in the floating state.
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 6 70 11111 0 0 cpu mode register (cpum : address 00fb 16 ) fix these bits to ?. stack page selection bit (note) 0 : zero page 1 : 1 page fix these bits to ?. note : please beware of this bit when programming because it is set to ??after the reset release. cpu mode register the cpu mode register contains the stack page selection bit. the cpu mode register is allocated at address 00fb 16 . functional description central processing unit (cpu) the m37220m3-xxxsp uses the standard 740 family instruction set. refer to the table of 740 family addressing modes and machine in- structions or the series 740 users manual for details on the instruction set. machine-resident 740 family instructions are as follows: the fst, slw instruction cannot be used. the mul, div, wit and stp instruction can be used. fig. 1. structure of cpu mode register
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 7 0000 16 00c0 16 00ff 16 013f 16 06b3 16 d000 16 sfr area not used not used ffff 16 ffde 16 ff00 16 0600 16 interrupt vector area not used 10000 16 10fff 16 1ffff 16 zero page rom for display (4 k bytes) special page rom (12 k bytes) ram for display (note) (80 bytes) ram (256 bytes) note : refer to table 8. contents of crt display ram. memory special function register (sfr) area the special function register (sfr) area in the zero page contains control registers such as i/o ports and timers. ram ram is used for data storage and for stack area of subroutine calls and interrupts. rom rom is used for storing user programs as well as the interrupt vector area. ram for display ram for display is used for specifying the character codes and col- ors to display. rom for display rom for display is used for storing character data. interrupt vector area the interrupt vector area contains reset and interrupt vectors. zero page the 256 bytes from addresses 0000 16 to 00ff 16 are called the zero page area. the internal ram and the special function registers (sfr) are allocated to this area. the zero page addressing mode can be used to specify memory and register addresses in the zero page area. access to this area with only 2 bytes is possible in the zero page addressing mode. special page the 256 bytes from addresses ff00 16 to ffff 16 are called the spe- cial page area. the special page addressing mode can be used to specify memory addresses in the special page area. access to this area with only 2 bytes is possible in the special page addressing mode. fig. 2. memory map
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 8 0 : 0 immediately after reset : fix this bit to 0 (do not write 1) : nothing is allocated n sfr area (addresses c0 16 to df 16 ) d0 16 d1 16 d2 16 d3 16 d4 16 d5 16 d6 16 d7 16 d8 16 d9 16 da 16 db 16 dc 16 dd 16 de 16 df 16 c0 16 c1 16 c2 16 c3 16 c4 16 c5 16 c6 16 c7 16 c8 16 c9 16 cb 16 cc 16 cd 16 ce 16 cf 16 ca 16 address port p5 (p5) port p5 direction register (d5) port p3 output mode control register (p3s) da-h register (da-h) da-l register (da-l) pwm0 register (pwm0) port p1 (p1) port p1 direction register (d1) port p3 (p3) port p3 direction register (d3) port p2 (p2) port p2 direction register (d2) register port p0 (p0) port p0 direction register (d0) pwm1 register (pwm1) pwm2 register (pwm2) pwm3 register (pwm3) pwm4 register (pwm4) pwm output control register 1 (pw) pwm output control register 2 (pn) serial i/o mode register (sm) serial i/o regsiter (sio) da1 conversion register (da1) da2 conversion register (da2) : 1 immediately after reset : undefined immediately after reset 1 ? p30s p31s pw0 pw1 pw2 pw3 pw4 pw5 pw6 pw7 pn2 pn3 pn4 sm0 sm1 sm2 sm3 sm5 sm6 b7 b0 bit allocation state immediately after reset ? 00 16 b7 b0 ? 00 16 ? 00 16 ? ? ? ? ? 0 0 0 0 0 00 0 00 0 ? ? 0 0 0 0 00 0 00 0 ? ? ? ? ? 0 0 00 0 00 0 ? 0 0 ? ? ? ? ? ? ? ? ? ? ? 00 16 0 0 00 0 00 0 ? ? ? ? 0 0 00 0 00 0 ? ? 0 0 ? ? ?? ? ? 0 0 ? ? ?? ? ? ? da1s da2s da10 da11 da12 da13 da14 da15 da20 da21 da22 da23 da24 da25 ? fig. 3. memory map of sfr (special function register) (1)
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 9 fig. 4. memory map of sfr (special function register) (2) f0 16 f1 16 f2 16 f3 16 f4 16 f5 16 f6 16 f7 16 f8 16 f9 16 fa 16 fb 16 fc 16 fd 16 fe 16 ff 16 e0 16 e1 16 e2 16 e3 16 e4 16 e5 16 e6 16 e7 16 e8 16 e9 16 eb 16 ec 16 ed 16 ee 16 ef 16 ea 16 address crt control register (cc) crt port control register (crtp) a-d control register 1 (ad1) a-d control register 2 (ad2) timer 1 (tm1) vertical register 2 (cv2) color register 0 (co0) color register 1 (co1) character size register (cs) border selection register (md) register horizontal position register (hr) vertical register 1 (cv1) timer 2 (tm2) timer 3 (tm3) timer 4 (tm4) timer 12 mode register (t12m) timer 34 mode register (t34m) pwm5 register (pwm5) interrupt input polarity register (re) test register (test) interrupt request register 1 (ireq1) interrupt request register 2 (ireq2) interrupt control register 1 (icon1) interrupt control register 2 (icon2) color register 2 (co2) color register 3 (co3) crt clock selection register (ck) cpu mode register (cpum) b7 b0 bit allocation hr0 hr1 hr2 hr3 hr4 hr5 cv10 cv11 cv12 cv13 cv14 cv15 cv16 cv20 cv21 cv22 cv23 cv24 cv25 cv26 cs10 cs11 cs20 cs21 md10 md20 co01 co02 co03 co05 aaa aaa co11 co12 co13 co15 co21 co22 co23 co25 co31 co32 co33 co35 cc0 cc1 cc2 vsyc r/g/b out op5 op6 op7 hsyc ck0 ck1 adm0 adm1 adm2 adm4 a a a aaa adc0 adc1 a a a aaa adc2 adc4 adc3 adc5 aaa aaa t34m0 aaa aaa t34m1 t34m2 t34m3 t34m4 aaa aaa t12m0 aaa aaa t12m1 t12m2 t12m3 t12m4 ck0 re5 re4 re3 cm2 aaa aaa tm1r aaa aaa tm2r tm3r tm4r crtr vscr it3r ck0 aa aa msr 1t1r 1t2r s1r aaa a a a aaa tm1e aaa a a a aaa tm2e tm3e tm4e crte vsce it3e 1t1e 1t2e s1e mse t34m5 state immediately after reset ? aaa aaa aa aa b7 b0 a a aa a a aa aa aa aa aa aa aa aa aa aa aa ck0 aa aa aa aa aa aa ck0 a a aa aa a a aa aa a a aa aa a a aa aa a a aa aa a a aa aa a a aa aaa a a a aaa 00000000 0 ?????? ? 0 ?????? ? ???? 0000 ?? 00000 0 00000000 ? 00 16 aa aa aaa aaa aa aa aaa aaa aa aa 00 00 00 0 aa aa 0 ? 00 0 00 0 0 00 00 00 0 0 ff 16 07 16 ff 16 07 16 00 00 00 0 0 00 00 00 0 0 ? ? ? aaaaaaaaaaaa aaaaaaaaaaaa 00 00 aaa aaa 0? aa aa 0 1 aa aa 1 aa aa 0 00 00 0 0 00 00 00 0 0 a a aa 00 00 00 0 0 00 00 00 0 0 00 00 16 aaa aaa 1 aa aa aaa aaa 11 aa aa 1 aa aa aaa aaa 00 0 00 00 0 0 0 0 00 00 0 0 0 0 00 00 0 0 0 0 00 00 0 0 0 aa aa 0 : ??immediately after reset aa aa : fix this bit to ??(do not write ?? : nothing is allocated n sfr area (addresses e0 16 to ff 16 ) : ??immediately after reset : undefined immediately after reset 1 ? : fix this bit to ??(do not write ??
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 10 interrupts interrupts can be caused by 13 different sources consisting of 3 ex- ternal, 9 internal, and 1 software sources. interrupts are vectored interrupts with priorities shown in table 1. reset is also included in the table because its operation is similar to an interrupt. when an interrupt is accepted, (1) the contents of the program counter and processor status register are automatically stored into the stack. (2) the interrupt disable flag i is set to 1 and the corresponding interrupt request bit is set to 0. (3) the jump destination address stored in the vector address enters the program counter. other interrupts are disabled when the interrupt disable flag is set to 1. all interrupts except the brk instruction interrupt have an interrupt request bit and an interrupt enable bit. the interrupt request bits are in interrupt request registers 1 and 2 and the interrupt enable bits are in interrupt control registers 1 and 2. figure 5 shows the structure of the interrupt-related registers. interrupts other than the brk instruction interrupt and reset are ac- cepted when the interrupt enable bit is 1, interrupt request bit is 1, and the interrupt disable flag is 0. the interrupt request bit can be set to 0 by a program, but not set to 1. the interrupt enable bit can be set to 0 and 1 by a program. reset is treated as a non-maskable interrupt with the highest priority. figure 6 shows interrupt control. interrupt causes (1) v sync and crt interrupts the v sync interrupt is an interrupt request synchronized with the vertical sync signal. the crt interrupt occurs after character block display to the crt is completed. (2) int1, int2, int3 interrupts with an external interrupt input, the system detects that the level of a pin changes from l to h or from h to l, and generates an interrupt request. the input active edge can be selected by bits 3, 4 and 5 of the interrupt input polarity register (address 00f9 16 ) : when this bit is 0, a change from l to h is de- tected; when it is 1, a change from h to l is detected. note that all bits are cleared to 0 at reset. (3) timer 1, 2, 3 and 4 interrupts an interrupt is generated by an overflow of timer 1, 2, 3 or 4. (4) serial i/o interrupt this is an interrupt request from the clock synchronous serial i/o function. (5) x in /4096 interrupt this interrupt occurs regularly with a f(x in )/4096 period. set bit 0 of the pwm output control register 1 to 0. (6) brk instruction interrupt this software interrupt has the least significant priority. it does not have a corresponding interrupt enable bit, and it is not af- fected by the interrupt disable flag i (non-maskable). priority 1 2 3 4 5 6 7 8 9 10 11 12 13 vector addresses ffff 16 , fffe 16 fffd 16 , fffc 16 fffb 16 , fffa 16 fff9 16 , fff8 16 fff5 16 , fff4 16 fff3 16 , fff2 16 fff1 16 , fff0 16 ffef 16 , ffee 16 ffed 16 , ffec 16 ffeb 16 , ffea 16 ffe9 16 , ffe8 16 ffe5 16 , ffe4 16 ffdf 16 , ffde 16 interrupt source reset crt interrupt int2 interrupt int1 interrupt timer 4 interrupt x in /4096 interrupt v sync interrupt timer 3 interrupt timer 2 interrupt timer 1 interrupt serial i/o interrupt int3 interrupt brk instruction interrupt remarks non-maskable active edge selectable active edge selectable active edge selectable non-maskable (software interrupt) table 1. interrupt vector addresses and priority
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 11 fix this bit to 0. int3 polarity switch bit 0 : positive polarity 1 : negative polarity interrupt input polarity register (re : address 00f9 16 ) fix these bits to 0. int1 polarity switch bit 0 : positive polarity 1 : negative polarity int2 polarity switch bit 0 : positive polarity 1 : negative polarity 7 0 00 interrupt request register 1 (ireq1 : address 00fc 16 ) 0 : no interrupt request issued 1 : interrupt request issued interrupt request register 2 (ireq2 : address 00fd 16 ) serial i/o interrupt request bit fix this bit to 0. 7 int1 interrupt request bit 0 int2 interrupt request bit x in /4096 interrupt request bit 0 0 : interrupt disabled 1 : interrupt enabled serial i/o interrupt enable bit 7 interrupt control register 2 (icon2 : address 00ff 16 ) int1 interrupt enable bit 0 int2 interrupt enable bit fix this bit to 0. x in /4096 interrupt enable bit 0 fix these bits to 0. 00 0 7 interrupt control register 1 (icon1 : address 00fe 16 ) timer 1 interrupt enable bit 0 timer 2 interrupt enable bit timer 3 interrupt enable bit timer 4 interrupt enable bit crt interrupt enable bit v sync interrupt enable bit int3 interrupt enable bit 7 timer 1 interrupt request bit 0 timer 2 interrupt request bit timer 3 interrupt request bit timer 4 interrupt request bit crt interrupt request bit v sync interrupt request bit int3 interrupt request bit 0 fig. 5. structure of interrupt-related registers
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 12 fig. 6. interrupt control interrupt request bit interrupt enable bit interrupt disable flag i brk instruction reset interrupt request
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 13 timers the m37220m3-xxxsp has 4 timers: timer 1, timer 2, timer 3, and timer 4. all timers are 8-bit timers with the 8-bit timer latch. the timer block diagram is shown in figure 8. all of the timers count down and their divide ratio is 1/(n+1), where n is the value of timer latch. the value is set to a timer at the same time by writing a count value to the corresponding timer latch (addresses 00f0 16 to 00f3 16 ). the count value is decremented by 1. the timer interrupt request bit is set to 1 by a timer overflow at the next count pulse after the count value reaches 00 16 . (1) timer 1 timer 1 can select one of the following count sources: ? f(x in )/16 ? f(x in )/4096 the count source of timer 1 is selected by setting bit 0 of the timer 12 mode register (address 00f4 16 ). timer 1 interrupt request occurs at timer 1 overflow. (2) timer 2 timer 2 can select one of the following count sources: ? f(x in )/16 ? timer 1 overflow signal ? external clock from the p2 4 /tim2 pin the count source of timer 2 is selected by setting bits 4 and 1 of the timer 12 mode register (address 00f4 16 ). when timer 1 overflow signal is a count source for the timer 2, the timer 1 functions as an 8- bit prescaler. timer 2 interrupt request occurs at timer 2 overflow. (3) timer 3 timer 3 can select one of the following count sources: ? f(x in )/16 ? external clock from the h sync pin ? external clock from the p2 3 /tim3 pin the count source of timer 3 is selected by setting bits 5 and 0 of the timer 34 mode register (address 00f5 16 ) timer 3 interrupt request occurs at timer 3 overflow. (4) timer 4 timer 4 can select one of the following count sources: ? f(x in )/16 ? f(x in )/2 ? timer 3 overflow signal the count source of timer 3 is selected by setting bits 4 and 1 of the timer 34 mode register (address 00f5 16 ). when timer 3 overflow signal is a count source for the timer 4, the timer 3 functions as an 8- bit prescaler. timer 4 interrupt request occurs at timer 4 overflow. at reset, timers 3 and 4 are connected by hardware and ff 16 is automatically set in timer 3; 07 16 in timer 4. the f(x in )/16 is se- lected as the timer 3 count source. the internal reset is released by timer 4 overflow at these state, the internal clock is connected. at execution of the stp instruction, timers 3 and 4 are connected by hardware and ff 16 is automatically set in timer 3; 07 16 in timer 4. however, the f(x in )/16 is not selected as the timer 3 count source. so set bit 0 of the timer 34 mode register (address 00f5 16 ) to 0 before the execution of the stp instruction (f(x in )/16 is selected as the timer 3 count source). the internal stp state is released by timer 4 overflow at these state, the internal clock is connected. because of this, the program starts with the stable clock. the structure of timer-related registers is shown in figure 7.
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 14 fig. 7. structure of timer-related registers timer 2 count stop bit 0 : count start 1 : count stop 70 timer 12 mode register (t12m : address 00f4 16 ) timer 1 count source selection bit 0 : f(x in )/16 1 : f(x in )/4096 timer 2 count source selection bit 0 : internal clock 1 : external clock from p2 4 /tim2 pin timer 1 count stop bit 0 : count start 1 : count stop timer 2 internal count source selection bit 0 : f(x in )/16 1 : timer 1 overflow 70 timer 34 mode register (t34m : address 00f5 16 ) timer 3 count source selection bit 0 : f(x in )/16 1 : external clock timer 4 internal count source selection bit 0 : timer 3 overflow 1 : f(x in )/16 timer 3 count stop bit 0 : count start 1 : count stop timer 4 count stop bit 0 : count start 1 : count stop timer 4 count source selection bit 0 : internal clock 1 : f(x in )/2 timer 3 external count source selection bit 0 : external clock from p2 3 /tim3 pin 1 : external clock from h sync pin 0 fix this bit to ?.
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 15 timer 1 (8) 1/4096 1/2 1/8 timer 1 latch (8) 8 8 8 t12m0 t12m2 t12m4 t12m1 t12m3 timer 2 (8) timer 2 latch (8) 8 8 8 timer 3 (8) timer 3 latch (8) 8 8 8 timer 4 (8) timer 4 latch (8) 8 8 8 data bus timer 1 interrupt request timer 2 interrupt request t34m0 t34m2 t34m5 t34m4 t34m3 t34m1 x in p2 4 /tim2 p2 3 /tim3 selection gate : connected to black colored side at reset t12m : timer 12 mode register t34m : timer 34 mode register notes 1 : h pulse width of external clock inputs tim2 and tim3 needs 4 machine cycles or more. 2 : when the external clock source is selected, timers 2 and 3 are counted at a rising edge of input signal. 3 : in the stop mode or the wait mode, external clock inputs tim2 and tim3 cannot be used ff 16 07 16 h sync reset stp instruction timer 3 interrupt request timer 4 interrupt request fig. 8. timer block diagram
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 16 8 serial i/o shift register (8) data bus serial i/o interrupt request selection gate : connected to black colored side at reset. synchronization circuit frequency divider 1/8 1/4 1/16 sm1 sm0 serial i/o counter (8) sm5: lsb msb s sm2 1/2 sm6 x in p2 2 /s in p2 1 /s out p2 0 /s clk 1/2 sm3 p2 1 latch p2 0 latch sm3 (address 00dd 16 ) sm : serial i/o mode register note: when the data is set in the serial i/o register (address 00dd 16 ), the register functions as the serial i/o shift register. (note) serial i/o the m37220m3-xxxsp has a built-in serial i/o which can either trans- mit or receive 8-bit data in serial in the clock synchronous mode. the serial i/o block diagram is shown in figure 9. the synchronizing clock i/o pin (s clk ), and data i/o pins (s out , s in ) also function as port p2. bit 2 of the serial i/o mode register (address 00dc 16 ) selects whether the synchronizing clock is supplied internally or externally (from the p2 0 /s clk pin). when an internal clock is selected, bits 1 and 0 select whether f(x in ) is divided by 4, 16, 32, or 64. bit 3 selects whether port p2 is used for serial i/o or not. to use the p2 2 /s in pin as the s in pin, set the bit 2 of the port p2 direction register (address 00c5 16 ) to 0. the operation of the serial i/o function is described below. the func- tion of the serial i/o differs depending on the clock source; external clock or internal clock. fig. 9. serial i/o block diagram
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 17 7 serial i/o mode register (sm : address 00dc 16 ) internal synchronizing clock selection bits b1 b0 0 0 : f(x in )/4 0 1 : f(x in )/16 1 0 : f(x in )/32 1 1 : f(x in )/64 0 0 synchronizing clock selection bit 0 : external clock 1 : internal clock serial i/o port selection bit 0 : p2 0 , p2 1 functions as port 1 : s clk , s out fix this bit to 0. transfer direction selection bit 0 : lsb first 1 : msb first serial input pin selection bit 0 : input signal from s in pin 1 : input signal from s out pin internal clockthe serial i/o counter is set to 7 during write cycle into the serial i/o register (address 00dd 16 ), and transfer clock goes h forcibly. at each falling edge of the transfer clock after the write cycle, serial data is output from the s out pin. transfer direction can be selected by bit 5 of the serial i/o mode register. at each rising edge of the transfer clock, data is input from the s in pin and data in the serial i/o register is shifted 1 bit. after the transfer clock has counted 8 times, the serial i/o counter becomes 0 and the transfer clock stops at h. at this time the inter- rupt request bit is set to 1. external clockwhen an external clock is selected as the clock source, the interrupt request is set to 1 after the transfer clock has counted 8 times. however, transfer operation does not stop, so con- trol the clock externally. use the external clock of 1mhz or less with a duty cycle of 50%. the serial i/o timing is shown in figure 11. when using an external clock for transfer, the external clock must be held at h for initializing the serial i/o counter. when switching between an internal clock and an external clock, do not switch during transfer. also, be sure to ini- tialize the serial i/o counter after switching. notes 1: on programming, note that the serial i/o counter is set by writing to the serial i/o register with the bit managing in- structions as seb and clb instructions. 2: when an external clock is used as the synchronizing clock, write transmit data to the serial i/o register at h of the transfer clock input level. fig. 10. structure of serial i/o mode register fig. 11. serial i/o timing (for lsb first) synchroninzing clock transfer clock serial i/o register write signal serial i/o output s out d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 (note) serial i/o input s in note : when an internal clock is selected, the s out pin is at high-impedance after transfer is completed. interrupt request bit is set to 1
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 18 serial i/o shift register (8) ? ? clock p2 0 /s clk p2 1 /s out p2 2 /s in sm6 sm: serial i/o mode register fig. 12. signals on serial i/o common transmission/reception mode serial i/o common transmission/reception mode by writing 1 to bit 6 of the serial i/o mode register, signals s in and s out are switched internally to be able to transmit or receive the serial data. figure 12 shows signals on serial i/o common transmission/recep- tion mode. note: when receiving the serial data after writing ff 16 to the serial i/o register.
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 19 pwm output function the m37220m3-xxxsp is equipped with a 14-bit pwm (da) and six 8-bit pwms (pwm0Cpwm5). da has a 14-bit resolution with the minimum resolution bit width of 0.25 m s (for f(x in ) = 8 mhz) and a repeat period of 4096 m s. pwm0Cpwm5 have the same circuit struc- ture and an 8-bit resolution with minimum resolution bit width of 4 m s (for f(x in ) = 8 mhz) and repeat period of 1024 m s. figure 13 shows the pwm block diagram. the pwm timing generat- ing circuit applies individual control signals to pwm0Cpwm5 using f(x in ) divided by 2 as a reference signal. (1) data setting when outputting da, first set the high-order 8 bits to the da-h regis- ter (address 00ce 16 ), then the low-order 6 bits to the da-l register (address 00cf 16 ). when outputting pwm0Cpwm5, set 8-bit output data in the pwmi register (i means 0 to 5; addresses 00d0 16 to 00d4 16 , 00f6 16 ). (2) transmitting data from register to pwm circuit data transfer from the 8-bit pwm register to 8-bit pwm circuit is executed at writing data to the register. the signal output from the 8-bit pwm output pin corresponds to the contents of this register. also, data transfer from the da register (addresses 00ce 16 and 00cf 16 ) to the 14-bit pwm circuit is executed at writing data to the da-l register (address 00cf 16 ). reading from the da-h register (address 00ce 16 ) means reading this transferred data. accordingly, it is possible to confirm the data being output from the d-a output pin by reading the da register. (3) operating of 8-bit pwm the following is the explanation about pwm operation. at first, set the bit 0 of pwm output control register 1 (address 00d5 16 ) to 0 (at reset, bit 0 is already set to 0 automatically), so that the pwm count source is supplied. pwm0Cpwm5 are also used as pins p0 0 Cp0 5 respectively. for pwm0Cpwm5, set the corresponding bits of the port p0 direction register to 1 (output mode). and select each output polarity by bit 3 of the pwm output control register 2(address 00d6 16 ). then, set bits 2 to 7 of the pwm output control register 1 to 1 (pwm output). the pwm waveform is output from the pwm output pins by setting these registers. figure 14 shows the 8-bit pwm timing. one cycle (t) is composed of 256 (2 8 ) segments. the 8 kinds of pulses relative to the weight of each bit (bits 0 to 7) are output inside the circuit during 1 cycle. refer to figure 14 (a). the 8-bit pwm outputs waveform which is the logi- cal sum (or) of pulses corresponding to the contents of bits 0 to 7 of the 8-bit pwm register. several examples are shown in figure 14 (b). 256 kinds of output (h level area: 0/256 to 255/256) are se- lected by changing the contents of the pwm register. a length of entirely h output cannot be output, i.e. 256/256. (4) operating of 14-bit pwm as with 8-bit pwm, set the bit 0 of the pwm output control register 1 (address 00d5 16 ) to 0 (at reset, bit 0 is already set to 0 automati- cally), so that the pwm count source is supplied. next, select the output polarity by bit 2 of the pwm output control register 2 (address 00d6 16 ). then, the 14-bit pwm outputs from the d-a output pin by setting bit 1 of the pwm output control register 1 to 0 (at reset, this bit already set to 0 automatically) to select the da output. the output example of the 14-bit pwm is shown in figure 15. the 14-bit pwm divides the data of the da latch into the low-order 6 bits and the high-order 8 bits. the fundamental waveform is determined with the high-order 8-bit data d h . a h level area with a length t 5 d h (h level area of fundamental waveform) is output every short area of t = 256 t = 64 m s ( t is the minimum resolution bit width of 0.25 m s). the h level area increase interval (t m ) is determined with the low-order 6-bit data d l . the h level are of smaller intervals t m shown in table 2 is longer by t than that of other smaller intervals in pwm repeat period t = 64t. thus, a rectangular waveform with the different h width is output from the d-a pin. accordingly, the pwm output changes by t unit pulse width by changing the contents of the da-h and da-l registers. a length of entirely h output cannot be output, i. e. 256/ 256. (5) output after reset at reset, the output of port p0 0 Cp0 5 is in the high-impedance state, and the contents of the pwm register and the pwm circuit are unde- fined. note that after reset, the pwm output is undefined until setting the pwm register.
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 20 inside of with the others. pwm1 register (address : 00d1 16 ) 1/2 x in pwm timing generating circuit pwm register (address : 00d0 16 ) b7 b0 8 8-bit pwm circuit pn3 p0 0 pw2 d0 0 pwm0 p0 1 pw3 d0 1 pwm1 p0 2 pw4 d0 2 pwm2 p0 3 pw5 d0 3 pwm3 p0 4 pw6 d0 4 pwm4 p0 5 pw7 d0 5 pwm5 14-bit pwm circuit pn2 pn4 pw1 da msb da-h register (address : 00ce 16 ) da latch (14 bits) da-l register (note) (address : 00cf 16 ) lsb 8 6 14 6 d-a pwm2 register (address : 00d2 16 ) pwm3 register (address : 00d3 16 ) pwm4 register (address : 00d4 16 ) pwm5 register (address : 00f6 16 ) data bus selection gate : pw pwm output control register 1 pn pwm output control register 2 pw0 b7 b0 connected to black colored side when reset. is as same contents pass gate p0 : port p0 register note: the da-l register also functions as the low-order 6 bits of the da latch. d0 port p0 direction register lsb table 2. relation between the low-order 6-bit data and high-level area increase interval area longer by t than that of other t m (m = 0 to 63) nothing m = 32 m = 16, 48 m = 8, 24, 40, 56 m = 4, 12, 20, 28, 36, 44, 52, 60 m = 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62 m = 1, 3, 5, 7, ................................ 57, 59, 61, 63 low-order 6 bits of data 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 fig. 13. pwm block diagram : : :
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 21 fig. 14. 8-bit pwm timing (a) pulses showing the weight of each bit 13579 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 255 4 12 20 28 36 44 52 60 68 76 84 92 100 108 116 124 132 140 148 156 164 172 180 188 196 204 212 220 228 236 244 252 8 16 48 80 112 144 176 208 240 24 40 56 72 88 104 120 136 152 168 184 200 216 232 248 32 96 160 224 64 192 bit 7 2 6 10 14 18 22 26 30 34 38 42 46 50 54 58 62 66 70 74 78 82 86 90 94 98 102 106 110 114 118 122 126 130 134 138 142 146 150 154 158 162 166 170 174 178 182 186 190 194 198 202 206 210 214 218 222 226 230 234 238 242 246 250 254 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 128 bit 0 pwm output t = 4 s t = 1024 s f(x in ) = 8 mhz (b) example of 8-bit pwm t 00 16 (0) 01 16 (1) 18 16 (24) ff 16 (255) t = 256 t
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 22 0.25 m s b7 b0 b6 b5 b4 b3 b2 b1 0 0 01 011 0 b13 b6 0 010 110 b0 b5 1010 00 set 2c 16 to da-h register. [da-h register] d h at writing of da-l b0 b6 b5 b4 b3 b2 b1 0 10 100 set 28 16 to da-l register. [da-l register] d l at writing of da-l undefined these bits decide h level area of fundamental waveform. these bits decide smaller interval tm in which h leval area is [h level area of fundamental waveform + t ]. = minimum resolution bit width 0.25 m s high-order 8-bit value of da latch 5 h level area of fundamental waveform ff 00 d3 fe fd d6 d4 02 01 d5 14-bit pwm output 8-bit counter 0.25 m s 5 44 ff 00 d3 fe fd d6 d4 02 01 d5 14-bit pwm output 8-bit counter 0.25 m s 5 45 fundamental waveform waveform of smaller interval tm specified by low-order 6 bits fundamental waveform of smaller interval tm which is not specified by low-order 6 bits is not changed. 14-bit pwm output da latch of low-order 6-bit output 0.25 m s 5 44 t = 0.25 m s t = 4096 m s repeat period t 0 t 1 t 2 t 3 t 4 t 5 t 59 t 60 t 61 t 62 t 63 [da latch] b7 2c 2b 2a 03 02 01 00 2c 2b 2a 03 02 01 00 fig. 15. 14-bit pwm output example (f(x in )= 8 mhz) 0
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 23 fig. 16. structure of pwm-related registers da, pwm count source selection bit 0 : count source supply 1 : count source stop da/pn 4 output selection bit 0 : da output 1 : pn 4 output p0 0 /pwm0 output selection bit 0 : p0 0 output 1 : pwm0 output p0 1 /pwm1 output selection bit 0 : p0 1 output 1 : pwm1 output 0 7 pwm output control register 1 (pw: address 00d5 16 ) p0 2 /pwm2 output selection bit 0 : p0 2 output 1 : pwm2 output p0 3 /pwm3 output selection bit 0 : p0 3 output 1 : pwm3 output p0 4 /pwm4 output selection bit 0 : p0 4 output 1 : pwm4 output p0 5 /pwm5 output selection bit 0 : p0 5 output 1 : pwm5 output 0 7 pwm output control register 2 (pn: address 00d6 16 ) da output polarity selection bit 0 : positive polarity 1 : negative polarity pwm output polarity selection bit 0 : positive polarity 1 : negative polarity da general-purpose output bit 0 : output ? 1 : output ?
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 24 0 7 a-d control register 2 (ad2: address 00ef 16 ) aaaaaa aaaaaa d-a converter set bits refer to table 3. a-d control register 1 bits 0 to 2 comparator control data bus bit 4 switch tree a-d control register 2 resistor ladder compa- rator analog signal switch bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 a-d control register 1 p1 5 /a-d1/int3 p1 6 /a-d2 p1 7 /a-d3 p0 6 /int2/a-d4 p3 0 /a-d5/da1 p3 1 /a-d6/da2 storage bit of comparison result 0 : input voltage < reference voltage 1 : input voltage > reference voltage a-d control register 1 (ad1: address 00ee 16 ) analog input pin selection bits b2 b1 b0 0 0 0 : a-d1 0 0 1 : a-d2 0 1 0 : a-d3 0 1 1 : a-d4 1 0 0 : a-d5 1 0 1 : a-d6 1 1 0 : 1 1 1 : do not set. 0 7 a-d control register 2 bit 1 0 0 1 0 1 1 bit 0 0 1 0 1 0 1 a-d comparator a-d comparator consists of 6-bit d-a converter and comparator. a-d comparator block diagram is shown in figure 19. the reference voltage v ref for d-a conversion is set by bits 0 to 5 of the a-d control register 2 (address 00ef 16 ). the comparison result of the analog input voltage and the reference voltage v ref is stored in bit 4 of the a-d control register 1 (address 00ee 16 ). for a-d comparison, set 0 to corresponding bits of the direction register to use ports as analog input pins. write the data for select of analog input pins to bits 0 to 2 of the a-d control register 1 and write the digital value corresponding to v ref to be compared to the bits 0 to 5 of the a-d control register 2. the voltage comparison starts by writing to the a-d control register 2, and it is completed after 16 ma- chine cycles (nop instruction 5 8). table 3. relation between contents of a-d control register 2 and reference voltage v ref bit 4 0 0 0 1 1 1 bit 3 0 0 0 1 1 1 bit 2 0 0 0 1 1 1 bit 5 0 0 0 1 1 1 1/128 v cc 3/128 v cc 5/128 v cc 123/128 v cc 125/128 v cc 127/128 v cc reference voltage v ref fig. 17. structure of a-d control register 1 fig.18. structure of a-d control register 2 fig. 19. a-d comparator block diagram
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 25 p3 0 output structure selection bit 0 : cmos output 1 : n-channel open-drain output 0 7 port p3 output mode control register (p3s: address 00cd 16 ) p3 1 output structure selection bit 0 : cmos output 1 : n-channel open-drain output da1 output enable bit 0 : p3 0 input/output 1 : da1 output da2 output enable bit 0 : p3 1 input/output 1 : da2 output data bus da1 output enable bit resistor ladder da1 conversion register p3 0 /a-d5/da1 (address 00de 16 ) 6 p3 1 /a-d6/da2 6 resistor ladder da2 conversion register (address 00df 16 ) da2 output enable bit 0 7 da1 conversion register (da1: address 00de 16 ) da2 conversion register (da2: address 00df 16 ) aaaaa da conversion set bits refer to table 4. aaaaa fix this bit to ?. 0 d-a converter the m37220m3-xxxsp has 2 d-a converters with 6-bit resolution. d-a converter block diagram is shown in figure 22. d-a conversion is performed by setting the value in the da conver- sion register. the result of d-a conversion is output from the da pin by setting 1 to the da output enable bit of the port p3 output mode control register (bits 2 and 3 at address 00cd 16 ). the output analog voltage v is determined with the value n (n: deci- mal number) in the da conversion register. v = v cc 5 (n = 0 to 63) the da output does not build in a buffer, so connect an external buffer when driving a low-impedance load. fig. 20 structure of d-a converter register fig. 22. d-a converter block diagram d-a conversion register bit 1 0 0 1 0 1 1 bit 0 0 1 0 1 0 1 table 4. relation between contents of d-a conversion register and output voltage bit 4 0 0 0 1 1 1 bit 3 0 0 0 1 1 1 bit 2 0 0 0 1 1 1 bit 5 0 0 0 1 1 1 0/64 v cc 1/64 v cc 2/64 v cc 61/64 v cc 62/64 v cc 63/64v cc output voltage v fig.21. structure of port p3 output mode register n 64
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 26 7 crt control register (cc: address 00ea 16 ) all-blocks display control bit (note) 0 : all-blocks display off 1 : all-blocks display on block 1 display control bit 0 : block 1 display off 1 : block 1 display on block 2 display control bit 0 : block 2 display off 1 : block 2 display on note: display is controlled by logical product (and) between the all-blocks diplay control bit and each block display control bit. crt display functions (1) outline of crt display functions table 5 outlines the crt display functions of the m37220m3-xxxsp. the m37220m3-xxxsp incorporates a crt display control circuit of 20 characters 5 2 lines. crt display is controlled by the crt con- trol register. up to 128 kinds of characters can be displayed. the colors can be specified for each character and up to 4 kinds of colors can be displayed on one screen. a combination of up to 7 colors can be obtained by using each output signal (r, g, and b). characters are displayed in a 12 5 16 dots configuration to obtain smooth character patterns (refer to figure 23). the following shows the procedure how to display characters on the crt screen. write the display character code in the display ram. specify the display color by using the color register. a write the color register in which the display color is set in the dis- play ram. ? specify the vertical position by using the vertical position register. ? specify the character size by using the character size register. ? specify the horizontal position by using the horizontal position register. ? write the display enable bit to the designated block display flag of the crt control register. when this is done, the crt display starts according to the input of the v sync signal. the crt display circuit has an extended display mode. this mode allows multiple lines (3 lines or more) to be displayed on the screen by interrupting the display each time one line is displayed and rewrit- ing data in the block for which display is terminated by software. figure 24 shows the structure of the crt display control register. figure 25 shows the block diagram of the crt display control circuit. functions 24 characters 5 2 lines 12 5 16 dots (refer to figure 23) 128 kinds 3 kinds 1 screen: 4 kinds, maximum 7 kinds a character possible (multiline display) possible (maximum 7 kinds) parameter number of display characters dot structure kinds of characters kinds of character sizes color display expansion raster coloring table 5. outline of crt display functions fig. 23. crt display character configuration fig. 24. structure of crt control register 12 dots 16 dot s kinds of colors coloring unit 0
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 27 fig. 25. block diagram of crt display control circuit crt control register (address 00ea 16 ) vertical position registers (addresses 00e1 16 , 00e2 16 ) character size register (address 00e4 16 ) horizontal position register (address 00e0 16 ) border selection register (address 00e5 16 ) display oscillation circuit osc1 osc2 display position control circuit h sync v sync display control circuit ram for display 9 bits 5 20 5 2 color registers (addresses 00e6 16 to 00e9 16 ) crt port control register (address 00ec 16 ) data bus rom for display 12 bits 5 16 5 128 shift register 12 bits shift register 12 bits output circuit r g b out
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 28 (2) display position the display positions of characters are specified in units called a block. there are 2 blocks, block 1 and block 2. up to 20 characters can be displayed in each block (refer to (4) memory for display). the display position of each block can be set in both horizontal and vertical directions by software. the display position in the horizontal direction can be selected for all blocks in common from 64-step display positions in units of 4t c (t c = oscillating cycle for display). the display position in the vertical direction for each block can be selected from 128-step display positions in units of 4 scanning lines. block 2 is displayed after the display of block 1 is completed (refer to figure 26 (a)). accordingly, if the display of block 2 starts during the display of block 1, only block 1 is displayed. similarly, when multiline display, block 1 is displayed after the display of block 2 is completed (refer to figure 26 (b)). the vertical position can be specified from 128-step positions (4 scan- ning lines per a step) for each block by setting values 00 16 to 7f 16 to bits 0 to 6 in the vertical position register (addresses 00e1 16 and 00e2 16 ). figure 28 shows the structure of the vertical position regis- ter. fig. 26. display position (hr) cv1 cv2 block 1 block 2 (a) example when each block is separated cv1 cv2 block 1 block 2 block 1 (second) cv1 no display no display (b) example when block 2 overlaps with block 1
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 29 horizontal position register (hr : address 00e0 16 ) horizontal display start positions 64 steps from 00 16 to 3f 16 (1 step is 4tc) 70 the horizontal position is common to all blocks, and can be set in 64 steps (where 1 step is 4t c , t c being the display oscillation period) as values 00 16 to 3f 16 in bits 0 to 5 of the horizontal position register (address 00e0 16 ). the structure of the horizontal position register is shown in figure 29. the display position in the vertical direction is determined by count- ing the horizontal sync signal (h sync ). at this time, it starts to count the rising edge (falling edge) of h sync signal from after about 1 ma- chine cycle of rising edge (falling edge) of v sync signal. so interval from rising edge (falling edge) of v sync signal to rising edge (falling edge) of h sync signal needs enough time (2 machine cycles or more) for avoiding jitter. the polarity of h sync and v sync signals can se- lect with the crt port control register (address 00ec 16 ). for details. refer to (8) crt output pin control. note: when bits 0 and 1 of the crt port control register (address 00ec 16 ) are set to 1 (negative polarity), the vertical position is determined by counting falling edge of h sync signal after rising edge of v sync control signal in the microcomputer (re- fer to figure 27). fig. 27. supplement explanation for display position fig. 28. structure of vertical position register fig. 29. structure of horizontal position register when bits 0 and 1 of the crt port control register (address 00ec 16 ) are set to 1 (negative polarity) v sync signal input v sync control signal in microcomputer 0.125 to 0.25 [ m s] ( at f(x in ) = 8mhz) period of counting h sync signal (note) h sync signal input not count 12345 note: do not generate falling edge of h sync signal near rising edge of v sync control signal in microcomputer to avoid jitter. vertical position registers 1, 2 (cv1 : address 00e1 16 ) (cv2 : address 00e2 16 ) 70 vertical display start positions 128 steps from 00 16 to 7f 16
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 30 mini- mum medium large horizontal display start position csn0 0 1 0 1 (3) character size the size of characters to be displayed can be from 3 sizes for each block. use the character size register (address 00e4 16 ) to set a char- acter size. the character size of block 1 can be specified by using bits 0 and 1 of the character size register; the character size of block 2 can be specified by using bits 2 and 3. figure 30 shows the struc- ture of the character size register. the character size can be selected from 3 sizes: minimum size, me- dium size and large size. each character size is determined by the number of scanning lines in the height (vertical) direction and the oscillating cycle for display (t c ) in the width (horizontal) direction. the minimum size consists of [1 scanning line] 5 [1t c ]; the medium size consists of [2 scanning lines] 5 [2t c ]; and the large size con- sists of [3 scanning lines] 5 [3t c ]. table 6 shows the relation be- tween the set values in the character size register and the character sizes. set values of character size register csn1 0 0 1 1 character size minimum medium large width (horizontal) direction t c : oscillating cycle for display 1t c 2t c 3t c height (vertical) direction scanning lines 1 2 3 this is not available note: the display start position in the horizontal direction is not affected by the character size. in other words, the horizontal display start position is common to all blocks even when the character size varies with each block (refer to figure 31). table 6. relation between set values in character size register and character sizes fig. 31. display start position of each character size (horizontal direction) fig. 30. structure of character size register 0 7 character size register (cs : address 00e4 16 ) character size of block 1 selection bits 0 0 : minimum size 0 1 : medium size 1 0 : large size 1 1 : do not set. character size of block 2 selection bits 0 0 : minimum size 0 1 : medium size 1 0 : large size 1 1 : do not set .
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 31 (4) memory for display there are 2 types of memory for display : crt display rom (ad- dresses 10000 16 to 10fff 16 ) used to store character dot data (masked) and crt display ram (addresses 0600 16 to 06b3 16 ) used to specify the colors of characters to be displayed. the following de- scribes each type of display memory. rom for display (addresses 10000 16 to 10fff 16 ) the crt display rom contains dot pattern data for characters to be displayed. for characters stored in this rom to be actually displayed, it is necessary to specify them by writing the character code inherent to each character (code determined based on the addresses in the crt display rom) into the crt display ram. the character code list is shown in table 7. the crt display rom has a capacity of 4k bytes. since 32 bytes are required for 1 character data, the rom can stores up to 128 kinds of characters. the crt display rom space is broadly divided into 2 areas. the [vertical 16 dots] 5 [horizontal (left side) 8 dots] data of display char- acters are stored in addresses 10000 16 to 107ff 16 ; the [vertical 16 dots] 5 [horizontal (right side) 4 dots] data of display characters are stored in addresses 10800 16 to 10fff 16 (refer to figure 32). note however that the high-order 4 bits in the data to be written to ad- dresses 10800 16 to 10fff 16 must be set to 1 (by writing data fx 16 ). fig. 32. display character stored data 0000000 0000000 0000010 0000101 0001000 0001000 0001000 0010000 0 1 01 1111 001 0100000 0100000 0100000 0000000 0000101 0000010 0 111 1 000 0 00 0 0 00 0 0 000 0 000 0 000 0 000 0 100 0 100 0 100 0 010 0 010 0 010 0 000 0 000 0 000 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 111 1 b7 b0 b7 b0 b3 10xx0 16 10xxf 16 10xx0 16 +800 16 10xxf 16 +800 16 0 0000 0 0 0 0 0 1 1 1 0 0 0 0 0 0
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 32 block character code specification color specification 19rd character 3rd character : 18nd character 1st character 2nd character not used 20th character 19rd character 3rd character : 18nd character 1st character 2nd character 20th character 0612 16 0602 16 : 0611 16 0600 16 0601 16 0613 16 0614 16 to 061f 16 0632 16 0622 16 : 0631 16 0620 16 0621 16 0633 16 0692 16 0682 16 : 0691 16 0680 16 0681 16 0693 16 0694 16 to 069f 16 06b2 16 06a2 16 : 06b1 16 06a0 16 06a1 16 06b3 16 ram for display (addresses 0600 16 to 06b3 16 ) the crt display ram is allocated at addresses 0600 16 to 06b3 16 , and is divided into a display character code specification part and display color specification part for each block. table 8 shows the contents of the crt display ram. for example, to display 1 character position (the left edge) in block 1, write the character code in address 0600 16 and write the color register no. to the low-order 2 bits (bits 0 and 1) in address 0680 16 . the color register no. to be written here is one of the 4 color regis- ters in which the color to be displayed is set in advance. for details on color registers, refer to (5) color registers. the structure of the crt display ram is shown in figure 33. block 1 display position (from left) table 8. contents of crt display ram block 2 table 7. character code list (partially abbreviated) character data storage address left 8 dots lines right 4 dots lines 00 16 10000 16 to 1000f 16 10010 16 to 1001f 16 10020 16 to 1002f 16 01 16 02 16 10030 16 to 1003f 16 : 03 16 character code : 10800 16 to 1080f 16 10810 16 to 1081f 16 10820 16 to 1082f 16 10830 16 to 1083f 16 : 7e 16 107e0 16 to 107ef 16 107f0 16 to 107ff 16 7f 16 10fe0 16 to 10fef 16 10ff0 16 to 10fff 16
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 33 fig. 33. structure of crt display ram [color specification] 0 0 : specifying color register 0 0 1 : specifying color register 1 1 0 : specifying color register 2 1 1 : specifying color register 3 color register specification 0 1 block 1 [character specification] specify 128 characters (00 16 to 7f 16 ) character code 7 block 2 [character specification] 1st character : 0620 16 20th character : 0633 16 1st character : 0680 16 20th character : 0693 16 1st character : 0600 16 20th character : 0613 16 7 [color specification] 1st character : 06a0 16 20th character : 06b3 16 0 1 to to to to specify 128 characters (00 16 to 7f 16 ) character code 0 0 : specifying color register 0 0 1 : specifying color register 1 1 0 : specifying color register 2 1 1 : specifying color register 3 color register specification 0 0
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 34 (5) color registers the color of a displayed character can be specified by setting the color to one of the 4 registers (co0 to co3: addresses 00e6 16 to 00e9 16 ) and then specifying that color register with the crt display ram. there are 3 color outputs; r, g and b. by using a combination of these outputs, it is possible to set 2 3 C1 (when no output) = 7 col- ors. however, since only 4 color registers are available, up to 4 col- ors can be disabled at one time. r, g and b outputs are set by using bits 1 to 3 in the color register. bit 5 is used to specify whether a character output or blank output. figure 34 shows the structure of the color register. 0 7 color register 0, 1, 2, 3 (co0 : address 00e6 16 ) (co1 : address 00e7 16 ) (co2 : address 00e8 16 ) (co3 : address 00e9 16 ) b signal output selection bit 0 : no character is output 1 : character is output g signal output selection bit 0 : no character is output 1 : character is output r signal output selection bit 0 : no character is output 1 : character is output out signal output control bit 0 : character is output 1 : blank is output fig. 34. structure of color registers
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 35 block 1 out output border selection bit 0 : same output as r, g, b is output 1 : border output 0 7 border selection register (md : address 00e5 16 ) block 2 out output border selection bit 0 : same output as r, g, b is output 1 : border output (6) character border function an border of 1 clock (1 dot) equivalent size can be added to a char- acter to be displayed in both horizontal and vertical directions. the border is output from the out pin. in this case, set bit 5 of a color register to 0 (character is output). border can be specified in units of block by using the border selec- tion register (address 00e5 16 ). figure 35 shows the structure of the border selection register. table 9 shows the relationship between the values set in the border selection register and the character bor- der function. fig. 36. example of border fig. 35. structure of border selection register border selection register example of output functions mdn0 0 1 border including character ordinary r, g, b output out output r, g, b output out output table 9. relationship between set value in border selection register and character border function
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 36 block 1 (on display) ?rt interrupt request on display (crt interrupt request occurs at the end of block display) block 2 (on display) block 1' (on display) block 2' (on display) ?rt interrupt request ?rt interrupt request ?rt interrupt request block 1 (on display) ?rt interrupt request off display (crt interrupt request does not occur at the end of block display) block 2 (on display) block 1' (off display) block 2' (off display) ?rt interrupt request no ?rt interrupt request no ?rt interrupt request (7) multiline display the m37220m3-xxxsp can ordinarily display 2 lines on the crt screen by displaying 2 blocks at different vertical positions. in addi- tion, it can display up to 16 lines by using crt interrupts. a crt interrupt request occurs at the point at which display of each block has been completed. in other words, when a scanning line reaches the point of the display position (specified by the vertical position registers) of a certain block, the character display of that block starts, and an interrupt occurs at the point at which the scan- ning line exceeds the block. note: a crt interrupt does not occur at the end of display when the block is not displayed. in other words, if a block is set to off display with the display control bit of the crt control reg- ister (address 00ea 16 ), a crt interrupt request does not occur (refer to figure 37). fig. 37. timing of crt interrupt request
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 37 aaaaa a aaa a a aaa a aaaaa aa aa aa a a aa aa aa a' a a a ?ed ?lue h sync r b out signals across a ?a' (8) crt output pin control the crt output pins r, g, b, and out can also function as ports p5 2 , p5 3 , p5 4 and p5 5 . set the corresponding bit of the port p5 di- rection register (address 00cb 16 ) to 0 to specify these pins as crt output pins, or set it to 1 to specify it as a general-purpose port p5 pins. the input polarity of signals h sync and v sync and output polarity of signals r, g, b, and out can be specified with the bits of the crt port control register (address 00ec 16 ) . set a bit to 0 to specify positive polarity; set it to 1 to specify negative polarity. the struc- ture of the crt port control register is shown in figure 38. (9) raster coloring function an entire screen (raster) can be colored by setting the bits 5 to 7 of the crt port control register. since each of the r, g, and b pins can be switched to raster coloring output, 7 raster colors can be obtained. if the r, g, and b pins have been set to mute signal output, a raster coloring signal is output in the part except a no-raster colored char- acter (in figure 39, a character o) during 1 horizontal scanning period. this ensures that character colors do not mix with the raster color. in this case, mute signal is output from the out pin. an example in which a magenta character i and a red character o are displayed with blue raster coloring is shown in figure 39. fig. 39. example of raster coloring fig. 38. structure of crt port control register 0 7 crt port control register (crtp : address 00ec 16 ) h sync input polarity switch bit 0 : positive polarity 1 : negative polarity r signal output switch bit 0 : r signal output 1 : mute signal output v sync input polarity switch bit 0 : positive polarity 1 : negative polarity r, g, b output polarity switch bit 0 : positive polarity 1 : negative polarity out output polarity switch bit 0 : positive polarity 1 : negative polarity g signal output switch bit 0 : g signal output 1 : mute signal output b signal output switch bit 0 : b signal output 1 : mute signal output
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 38 0 7 0 00 000 crt clock selection register (ck : address 00ed 16 ) display clock selection bits refer to table 10. fix these bits to ?. (10) clock for display as a clock for display to be used for crt display, it is possible to select one of the following 4 types. ? main clock supplied from the x in pin ? main clock supplied from the x in pin divided by 1.5 ? clock from the lc or rc supplied from the pins osc1 and osc2. ? clock from the ceramic resonator or quartz-crystal oscillator sup- plied from the pins osc1 and osc2. this clock for display can be selected for each block by the crt clock selection register (address 00ed 16 ). when selecting the main clock, set the oscillation frequency to 8 mhz. table 10. set value of crt clock selection register and clock for display b0 0 1 0 1 b1 0 0 1 1 functions the clock for display is supplied by connecting rc or lc across the pins osc1 and osc2. since the main clock is used as the clock for display, the oscillation frequency is limited. because of this, the character size in width (horizontal) direction is also limited. in this case, pins osc1 and osc2 are also used as input ports p3 3 and p3 4 respectively. the clock for display is supplied by connecting the following across the pins osc1 and osc2. ? a ceramic resonator only for crt display and a feedback resistor ? a quartz-crystal oscillator only for crt display and a feedback resistor (note) note: it is necessary to connect other ceramic resonator or quartz-crystal oscillator across the pins x in and x out . fig. 40. structure of crt clock selection register crt oscillation frequency = f(x in ) crt oscillation frequency = f(x in )/1.5
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 39 power source voltage 0 v reset input voltage 0 v 4.5 v 0.6 v poweron 21 25 22 vcc reset vss m37220m3-xxxsp 1 5 4 3 0.1 m f m51953al reset circuit the m37220m3-xxxsp is reset according to the sequence shown in figure 41. it starts the program from the address formed by using the content of address ffff 16 as the high-order address and the content of the address fffe 16 as the low-order address, when the reset pin is held at l level for 2 m s or more while the power source voltage is 5 v 10 % and the oscillation of a quartz-crystal oscillator or a ceramic resonator is stable and then returned to h level. the internal state of microcomputer at reset are shown in figure 43. an example of the reset circuit is shown in figure 42. the reset input voltage must be kept 0.6 v or less until the power source voltage surpasses 4.5 v. fig. 41. reset sequence fig. 42. example of reset circuit x in f reset internal reset sync address data 32768 count of x in clock cycle (note 3) reset address from the vector table ? ? 01, s 01, s-1 01, s-2 fffe ffff ad h , ad l ? ? ? ? ? ad l ad h notes 1 : f(x in ) and f( f ) are in the relation : f(x in ) = 2f ( f ). 2 : a question mark (?) indicates an undefined state that depends on the previous state. immediately after a reset, timer 3 and timer 4 are connected in hardware. at this time, ff 16 is set in timer 3 and 07 16 is set to timer 4. timer 3 counts down with f(x in )/16, and reset state is released by the timer 4 overflow signal. 3:
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 40 00 16 port p0 direction register 00 16 00 16 da-l register pwm output control register 1 00 16 serial i/o mode register port p1 direction register port p2 direction register port p5 port p5 direction register port p3 output mode control register pwm output control register 2 000 000 00 0 0 00 port p3 direction register 0 0 0 00 0 0 0 (00c1 16 ) (00c3 16 ) (00c5 16 ) (00c7 16 ) (00ca 16 ) (00cb 16 ) (00cd 16 ) (00cf 16 ) (00d5 16 ) (00d6 16 ) (00dc 16 ) address contents of register address contents of register note : the contents of all other registers and ram are undefined at reset, so their initial values. ] : undefined : unused bit ] crt control register crt port control register crt clock selection register a-d control register 1 cpu mode register processor status register 07 16 timer 12 mode register interrupt input polarity register interrupt request register 1 contents of addressfffe 16 program counter timer 1 ff 16 07 16 a-d control register 2 timer 2 timer 3 timer 4 timer 34 mode register interrupt request register 2 interrupt control register 1 interrupt control register 2 (00ea 16 ) (00ec 16 ) (00ed 16 ) (00ee 16 ) (00ef 16 ) (00f0 16 ) (00f1 16 ) (00f2 16 ) (00f3 16 ) (00f4 16 ) (00f5 16 ) (00f9 16 ) (00fb 16 ) (00fc 16 ) (00fd 16 ) (00fe 16 ) (ps) (pc h ) (pc l ) (00ff 16 ) 0 0 0 00 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 ff 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 contents of addressffff 16 1 0 0 0 0 0 0 00 0 0 0 0 00 0 ] da1 conversion register (00de 16 ) horizontal register border selection register vertical position register 1 character size register (00e6 16 ) vertical position register 2 0 00 00 0 (00e0 16 ) (00e1 16 ) (00e2 16 ) (00e4 16 ) (00e5 16 ) color register 0 color register 1 color register 2 color register 3 (00e7 16 ) (00e8 16 ) (00e9 16 ) 00 00 00 00 00 00 00 00 da2 conversion register (00df 16 ) ]]] ]]]]] ] ]]]]]] ]] ]]]] ]]]]]] ] ]]]]]] ] ]] ] ] ] ] ]] ]]] ]] fig. 43. internal state of microcomputer at reset
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 41 fig. 44. i/o pin block diagram (1) ports p1, p2, p3 0 , p3 1 data bus direction register port latch ports p0 0 ?0 5 , p3 2 data bus direction register port latch ports p0 6 , p0 7 data bus direction register port latch n-channel open drain output port p0 0 Cp0 5 , p3 2 note: each port is also used as below: p0 0 Cp0 5 : pwm0Cpwm5 cmos output port p1, p2, p3 0 , p3 1 note: each port is also used as below: p1 5 : a-d1/int3 p1 6 : a-d2 p1 7 : a-d3 p2 0 : s clk p2 1 : s out p2 2 : s in n-channel open-drain output port p0 6 , p0 7 note: each port is also used as below: p0 6 : int2/a-d4 p0 7 : int1 p2 3 : tim3 p2 4 : tim2 p3 0 : a-d5/da1 p3 1 : a-d6/da2
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 42 data bus d-a, r, g, b, out h sync , v sync data bus schmidt input h sync , v sync cmos output d-a, r, g, b, out note: each pin is also used as below: r : p5 2 g : p5 3 b : p5 4 out : p5 5 fig. 45. i/o pin block diagram (2)
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 43 clock generating circuit the built-in clock generating circuit is shown in figure 48. when the stp instruction is executed, the internal clock stops at h level. at the same time, timers 3 and 4 are connected in hardware and ff 16 is set in the timer 3, 07 16 is set in the timer 4. select f(x in )/16 as the timer 3 count source (set bit 0 of the timer 34 mode register to 0 before the execution of the stp instruction). and besides, set the timer 3 and timer 4 interrupt enable bits to disabled (0) before ex- ecution of the stp instruction). the oscillator restarts when external interrupt is accepted, however, the internal clock keeps its h level until timer 4 overflows. because this allows time for oscillation stabi- lizing when a ceramic resonator or a quartz-crystal oscillator is used. when the wit instruction is executed, the internal clock stops in the h level but the oscillator continues running. this wait state is released when an interrupt is accepted (note). since the oscillator does not stop, the next instruction can be executed at once. when returning from the stop or the wait state, to accept an interrupt, set the corresponding interrupt enable bit to 1 before executing the stp or the wit instructions. note: in the wait mode, the following interrupts are invalid. (1) v sync interrupt (2) crt interrupt (3) f(x in )/4096 interrupt (4) timer 1 interrupt using f(x in )/4096 as count source (5) timer 2 interrupt using p2 4 /tim2 pin input as count source (6) timer 3 interrupt using p2 3 /tim3 pin input as count source (7) timer 4 interrupt using f(x in )/2 as count source (8) multi-master i 2 c-bus interface interrupt the circuit example using a ceramic resonator (or a quartz-crystal oscillator) is shown in figure 46. use the circuit constants in accor- dance with the resonator manufactures recommended values. the circuit example with external clock input is shown in figure 47. input the clock to the x in pin, and open the x out pin. interrupt request interrupt disable flag i reset sq r stp instruction sq r wit instruction s q r stp instruction reset internal clock 1/2 1/8 timer 3 timer 4 x out x in t34m0 t34m2 selection gate : connected to black colored side at reset. t34m : timer 34 mode register fig. 48. clock generating circuit block diagram fig. 47. external clock input circuit example fig. 46. ceramic resonator circuit example x i n x out c i n m 37220m 3- xxxsp c out 20 19 x in m37220m3-xxxsp 19 vcc vss external oscillation circuit
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 44 reset vss vcc circuit example 1 reset vss vcc circuit example 2 note : make the level change from ??to ??at the point at which the power source voltage exceeds the specified voltage. display oscillation circuit the crt display clock oscillation circuit has a built-in clock oscilla- tion circuits, so that a clock for display can be obtained simply by connecting an lc, an rc, a ceramic resonator or a quartz-crystal oscillator circuit across the pins osc 1 and osc 2. select the clock for display with bits 0 and 1 of the crt clock selection register (ad- dress 00ed 16 ). addressing mode the memory access is reinforced with 17 kinds of addressing modes. refer to the series 740 users manual for details. machine instructions there are 71 machine instructions. refer to the series 740 users manual for details. programming notes (1) the divide ratio of the timer is 1/(n+1). (2) even though the bbc and bbs instructions are executed imme- diately after the interrupt request bits are modified (by the pro- gram), those instructions are only valid for the contents before the modification. at least one instruction cycle is needed (such as an nop) between the modification of the interrupt request bits and the execution of the bbc and bbs instructions. (3) after the adc and sbc instructions are executed (in decimal mode), one instruction cycle (such as an nop) is needed before the sec, clc, or cld instruction is executed. (4) an nop instruction is needed immediately after the execution of a plp instruction. (5) in order to avoid noise and latch-up, connect a bypass capacitor ( ? 0.1 m f) directly between the v cc pinCv ss pin and the v cc pinC cnv ss pin using a thick wire. data required for mask orders the following are necessary when ordering a mask rom produc- tion: (1) mask rom order confirmation form (2) mark specification form (3) data to be written to rom, in eprom form (32-pin dip type 27c101, three identical copies) auto-clear circuit when power source is supplied, the auto-clear function can be per- ______ formed by connecting the following circuit to the reset pin. fig. 50. auto-clear circuit example fig. 49. display oscillation circuit osc2 osc1 l c1 c2
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 45 power source voltage (note 4), during cpu, crt operation power source voltage h input voltage p0 0 Cp0 7 ,p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 4 , s in , s clk , h sync , v sync , reset, x in , osc1, tim2, tim3, int1, int2, int3 l input voltage p0 0 Cp0 7 ,p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 4 l input voltage h sync , v sync , reset,tim2, tim3, int1, int2, int3, x in , osc1, s in , s clk h average output current (note 1) r, g, b, out, d-a, p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 l average output current (note 2) r, g, b, out, d-a, p0 6 , p0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 2 l average output current (note 2) p0 0 Cp0 5 l average output current (note 3) p2 4 Cp2 7 oscillation frequency (for cpu operation) (note 5) x in oscillation frequency (for crt display) (note 5) osc1 input frequency tim2, tim3 input frequency s clk v cc v ss v ih1 v il1 v il2 i oh i ol1 i ol2 i ol3 f cpu f crt f hs1 f hs2 v v v v v ma ma ma ma mhz mhz khz mhz absolute maximum ratings power source voltage v cc input voltage cnv ss input voltage p0 0 Cp0 7 ,p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 4 , osc1, x in , h sync , v sync , reset output voltage p0 6 , p0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 2 , r, g, b, out, d-a, x out , osc2 output voltage p0 0 Cp0 5 circuit current r, g, b, out, p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , d-a circuit current r, g, b, out, p0 6 , p0 7 , p1 0 Cp1 7 , p2 0 Cp2 3 , p3 0 Cp3 2 , d-a circuit current p0 0 Cp0 5 circuit current p2 4 Cp2 7 power dissipation operating temperature storage temperature symbol v cc v i v i v o v o i oh i ol1 i ol2 i ol3 p d t opr t stg ratings C0.3 to 6 C0.3 to 6 C0.3 to v cc + 0.3 C0.3 to v cc + 0.3 C0.3 to 13 0 to 1 (note 1) 0 to 2 (note 2) 0 to 1 (note 2) 0 to 10 (note 3) 550 C10 to 70 C40 to 125 unit v v v v v ma ma ma ma mw c c parameter recommended operating conditions (t a = C10 c to 70 c, v cc = 5 v 10 %, unless otherwise noted) min. 4.5 0 0.8v cc 0 0 7.9 5.0 typ. 5.0 0 8.0 limits symbol parameter unit notes 1: the total current that flows out of the ic must be 20 ma (max.). 2: the total input current to ic (i ol1 + i ol2 ) must be 30 ma or less. 3: the total average input current for ports p2 4 Cp2 7 to ic must be 20 ma or less. 4: connect 0.1 m f or more capacitor externally across the power source pins v cc Cv ss so as to reduce power source noise. also connect 0.1 m f or more capacitor externally across the pins v cc Ccnv ss . 5: use a quartz-crystal oscillator or a ceramic resonator for the cpu oscillation circuit. max. 5.5 0 v cc 0.4 v cc 0.2 v cc 1 2 1 10 8.1 8.0 100 1 conditions all voltages are based on v ss . output transistors are cut off. t a = 25 c
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 46 power source current h output voltage r, g, b, out, d-a, p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 l output voltage r, g, b, out, d-a, p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 3 , p3 0 Cp3 2 l output voltage p2 4 Cp2 7 hysteresis reset hysteresis (note) h sync , v sync , tim2, tim3, int1, int2, int3, s in , s clk h input leak current reset, p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 4 , h sync , v sync l input leak current ______ reset, p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 4 , h sync , v sync h output leak current p0 0 Cp0 5 electric characteristics (v cc = 5 v 10 %, v ss = 0 v, f(x in ) = 8 mhz, t a = C10 c to 70 c, unless otherwise noted) v cc = 5.5 v, f(x in ) = 8 mhz v cc = 5.5 v, f(x in ) = 0 v cc = 4.5 v i oh = C0.5 ma v cc = 4.5 v i ol = 0.5 ma v cc = 4.5 v i ol = 10.0 ma v cc = 5.0 v v cc = 5.0 v v cc = 5.5 v v i = 5.5 v v cc = 5.5 v v o = 0 v v cc = 5.5 v v i = 12 v i cc v oh v ol v t+ Cv tC i izh i izl i ozh limits typ. 20 30 0.5 0.5 min. 2.4 max. 40 60 300 0.4 3.0 0.7 1.3 5 5 10 symbol parameter test conditions unit ma m a v v v m a m a m a system operation stop mode crt off crt on note: p0 6 , p0 7 , p1 5 , p2 3 , p2 4 have the hysteresis when these pins are used as interrupt input pins or timer input pins. p2 0 Cp2 2 have the hysteresis when these pins are used as serial i/o pins. a-d comparator characteristics (v cc = 5 v 10 %, v ss = 0 v, f(x in ) = 8 mhz, t a = C10 c to 70 c, unless otherwise noted) resolution absolute accuracy max. 6 2 bits lsb min. 0 limits typ. 1 unit test conditions parameter symbol note: when v cc = 5 v, 1 lsb = 5/64 v. d-a converter characteristics (v cc = 5 v 10 %, v ss = 0 v, f(x in ) = 8 mhz, t a = C10 c to 70 c, unless otherwise noted) resolution absolute accuracy setting time output resistor max. 6 2 3 4 bits % m s k w min. 1 limits typ. 2.5 unit test conditions parameter symbol tsu r o
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 47 package outline
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 48 aaa gzz?h09?2b < 56a0 > 740 family mask rom confirmation form single-chip microcomputer m37220m3-xxxsp mitsubishi electric mask rom number date : supervisor signature receipt section head signature h customer company name date issued date : tel ( ) note : please fill in all items marked h . submitted by supervisor issuance signature h 1. confirmation specify the name of the product being ordered and the type of eproms submitted. three eproms are required for each pattern. if at least two of the three sets of eproms submitted contain identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differs from this data. thus, extreme care must be taken to verify the data in the submitted eproms. checksum code for entire eprom (hexadecimal notation) 27c101 eprom address 0000 16 aaa aaa product name ascii code : ?37220m3 000f 16 ffff 16 set ?f 16 ?in the shaded area. write the ascii codes that indicates the product name of ?37220m3 to addresses 0000 16 to 000f 16 . (1) (2) eprom type (indicate the type used) d000 16 character rom 1 107ff 16 h 2. mark specification mark specification must be submitted using the correct form for the type package being ordered fill out the appropriate mark specification form (42p4b for m37220m3-xxxsp) and attach to the mask rom confirmation form. (1/3) do you set ?f 16 ?in the shaded area ? do you write the ascii codes that indicates the product name of ?37220m3 to addresses 0000 16 to 000f 16 ? eprom data check item (refer the eprom data and check 3 ?in the appropriate box) ? yes n ? yes n l l 10000 16 10fff 16 data rom 12k bytes 10800 16 character rom 2 11000 16 1ffff 16 h 3. comments
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 49 gzz?h09?2b <56a0 > 740 family mask rom confirmation form single-chip microcomputer m37220m3-xxxsp mitsubishi electric ? = 16 4d 16 ? = 33 16 ? = 37 16 ? = 32 16 ? = 32 16 ? = 30 16 ? = 4d 16 ? = 33 0000 16 0001 16 0002 16 0003 16 0004 16 0005 16 0006 16 0007 16 address = 16 2 d 16 ff 16 ff 16 ff 16 ff 16 ff 16 ff 16 ff 0008 16 0009 16 000a 16 000b 16 000c 16 000d 16 000e 16 000f 16 address addresses 0000 16 to 000f 16 store the product name, and addresses 10000 16 to 10fff 16 store the character pattern. if the name of the product contained in the eproms does not match the name on the mask rom confirmation form, the rom processing is disabled. write the data correctly. inputting the name of the product with the ascii code ascii codes ?37220m3-?are listed on the right. the addresses and data are in hexadecimal notation. 1. inputting the character rom input the character rom data by dividing it into character rom1 and character rom2. for the character rom data, see the next page and on. 2. writing the product name and character rom data onto eproms (2/3)
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 50 gzz?h09?2b< 56a0 > 740 family mask rom confirmation form single-chip microcomputer m37220m3-xxxsp mitsubishi electric the structure of character rom (divided of 12 5 16 dots font) example character code ?a 16 example 101a0 16 to 101af 16 b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0 b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 0 0 0 1 1 1 2 2 3 4 4 4 0 0 f0 16 f0 16 f0 16 f0 16 f0 16 f0 16 f0 16 f0 16 f8 16 f8 16 f8 16 f4 16 f4 16 f4 16 f0 16 f0 16 example 109a0 16 to 109af 16 character rom1 character rom2 f 16 (3/3) 0 16 4 16 a 16 1 16 04 16 a 16 1 16 1 16 0 16 0 16 f 16 0 16 0 16 0 16 0 16 0 16
mitsubishi microcomputers m37220m3-xxxsp single-chip 8-bit cmos microcomputer for voltage synthesizer with on-screen display controller 51
sep. first edition 1996 h-df319-b editioned by committee of editing of mitsubishi semiconductor data book published by mitsubishi electric corp., semiconductor division this book, or parts thereof, may not be reproduced in any form without permission of mitsubishi electric corporation. ?1996 mitsubishi electric corporation printed in japan mitsubishi data book single-chip 8-bit microcomputers vol.3
rev. rev. no. date 1.0 first edition 9708 2.0 information about copywright note, revision number, release data added (last page). 971130 2.1 correct note (p43) 980731 m37220m3-xxxsp data sheet (1/1) revision description revision description list


▲Up To Search▲   

 
Price & Availability of M37220M3-010SP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X